<!-- 详情 -->
<template>
  <div v-loading="loading">
    <web-header></web-header>
    <div class="content">
      <p v-html="product"></p>
    </div>
  </div>
</template>
<script>
import { productDetail } from '../api'
export default {
  data () {
    return {
      product: '',
      loading: false,
    }
  },
  methods: {
    async getDetail () {
      try {
        this.loading = true
        const detail = await productDetail(this.$route.query.id)
        this.product = detail.content
        this.loading = false
      } catch (err) {
        this.loading = false
      }
    }
  },
  mounted () {
    this.getDetail()
  }
}
</script>
<style scoped>
.content >>> img {
  width: 100%;
  display: flex;
  flex-direction: column;
}
</style>